﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using blackhouse.BlackApart.Business.Prices;

namespace blackhouse.BlackApart.Business.Reservations {
    public class ReservationPriceRabat {

        #region Properties

        public int RecordId { get; internal set; }
        public IPriceRabat Rabat { get; private set; }
        public float OverrideRabatValue { get; set; }
        public float FinalRabatValue { get { return this.GetRabatValue(); } }

        #endregion

        #region Constructors

        public ReservationPriceRabat(IPriceRabat rabat) {
            this.Rabat = rabat;
        }

        #endregion

        #region Methods

        public float GetRabatValue() {
            if (this.OverrideRabatValue == 0)
                return this.Rabat.RabatValue;
            else
                return this.OverrideRabatValue;
        }

        #endregion

    }
}
